package io.gitee.milklynk.vo.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 模型枚举
 */
@Getter
@AllArgsConstructor
public enum Model {
    /** */
    DeepSeek_V3("deepseek-chat", "deepseek通用对话模型"),
    /** */
    DeepSeek_R1("deepseek-reasoner", "deepseek推理对话模型");

    /** 模型在 API 中使用的名称 */
    private final String name;
    /** 模型描述 */
    private final String description;

    /** 根据模型名称查找枚举（忽略大小写）*/
    public static Model fromModelName(String modelName) {
        for (Model model : values()) {
            if (model.name.equalsIgnoreCase(modelName)) {
                return model;
            }
        }
        throw new IllegalArgumentException("未知模型名称: " + modelName);
    }
    @Override
    public String toString() {
        return name;
    }
}
